<?php
$adm = new Models_Adm();
$adm->showAdmButtons();
$articles = $adm->showAllArticles();
echo '<table class="table table-striped">';
echo '<thead><tr>
        <th>#</th><th>name</th><th>created/modified</th><th>actions</th>
      </tr></thead>
      <tbody class="all-articles">';
foreach ($articles as $num => $article)
{
  $num++;
  echo "<tr>
    <td>$num</td><td>" . $article['name'] .
          "</td><td>" . $article['created'] .
          "/" . $article['modified'] .
     "</td><td><a href=\"/" . $adm->path .
          "adm/edit/" . $article['menu_id'] .
          "\"><span class=\"btn btn-primary btn-mini\"><i class=\"icon-pencil icon-white\"></i></span></a>" .
          "<a href=\"#\"><span class=\"btn btn-danger btn-mini\"><i class=\"icon-remove icon-white\"></i></span></a></td>
    </tr>";
}
echo '</tbody></table>';
?>
